{"ast":null,"code":"import ResizeObserver from 'resize-observer-polyfill';\n// =============================== Const ===============================\nvar elementListeners = new Map();\nfunction onResize(entities) {\n  entities.forEach(function (entity) {\n    var _elementListeners$get;\n    var target = entity.target;\n    (_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 ? void 0 : _elementListeners$get.forEach(function (listener) {\n      return listener(target);\n    });\n  });\n}\n// Note: ResizeObserver polyfill not support option to measure border-box resize\nvar resizeObserver = new ResizeObserver(onResize);\n// Dev env only\nexport var _el = process.env.NODE_ENV !== 'production' ? elementListeners : null; // eslint-disable-line\nexport var _rs = process.env.NODE_ENV !== 'production' ? onResize : null; // eslint-disable-line\n// ============================== Observe ==============================\nexport function observe(element, callback) {\n  if (!elementListeners.has(element)) {\n    elementListeners.set(element, new Set());\n    resizeObserver.observe(element);\n  }\n  elementListeners.get(element).add(callback);\n}\nexport function unobserve(element, callback) {\n  if (elementListeners.has(element)) {\n    elementListeners.get(element).delete(callback);\n    if (!elementListeners.get(element).size) {\n      resizeObserver.unobserve(element);\n      elementListeners.delete(element);\n    }\n  }\n}","map":{"version":3,"names":["ResizeObserver","elementListeners","Map","onResize","entities","forEach","entity","_elementListeners$get","target","get","listener","resizeObserver","_el","process","env","NODE_ENV","_rs","observe","element","callback","has","set","Set","add","unobserve","delete","size"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-resize-observer/es/utils/observerUtil.js"],"sourcesContent":["import ResizeObserver from 'resize-observer-polyfill';\n// =============================== Const ===============================\nvar elementListeners = new Map();\nfunction onResize(entities) {\n  entities.forEach(function (entity) {\n    var _elementListeners$get;\n    var target = entity.target;\n    (_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 ? void 0 : _elementListeners$get.forEach(function (listener) {\n      return listener(target);\n    });\n  });\n}\n// Note: ResizeObserver polyfill not support option to measure border-box resize\nvar resizeObserver = new ResizeObserver(onResize);\n// Dev env only\nexport var _el = process.env.NODE_ENV !== 'production' ? elementListeners : null; // eslint-disable-line\nexport var _rs = process.env.NODE_ENV !== 'production' ? onResize : null; // eslint-disable-line\n// ============================== Observe ==============================\nexport function observe(element, callback) {\n  if (!elementListeners.has(element)) {\n    elementListeners.set(element, new Set());\n    resizeObserver.observe(element);\n  }\n  elementListeners.get(element).add(callback);\n}\nexport function unobserve(element, callback) {\n  if (elementListeners.has(element)) {\n    elementListeners.get(element).delete(callback);\n    if (!elementListeners.get(element).size) {\n      resizeObserver.unobserve(element);\n      elementListeners.delete(element);\n    }\n  }\n}"],"mappings":"AAAA,OAAOA,cAAc,MAAM,0BAA0B;AACrD;AACA,IAAIC,gBAAgB,GAAG,IAAIC,GAAG,EAAE;AAChC,SAASC,QAAQ,CAACC,QAAQ,EAAE;EAC1BA,QAAQ,CAACC,OAAO,CAAC,UAAUC,MAAM,EAAE;IACjC,IAAIC,qBAAqB;IACzB,IAAIC,MAAM,GAAGF,MAAM,CAACE,MAAM;IAC1B,CAACD,qBAAqB,GAAGN,gBAAgB,CAACQ,GAAG,CAACD,MAAM,CAAC,MAAM,IAAI,IAAID,qBAAqB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,qBAAqB,CAACF,OAAO,CAAC,UAAUK,QAAQ,EAAE;MAC/J,OAAOA,QAAQ,CAACF,MAAM,CAAC;IACzB,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ;AACA;AACA,IAAIG,cAAc,GAAG,IAAIX,cAAc,CAACG,QAAQ,CAAC;AACjD;AACA,OAAO,IAAIS,GAAG,GAAGC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAGd,gBAAgB,GAAG,IAAI,CAAC,CAAC;AAClF,OAAO,IAAIe,GAAG,GAAGH,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAGZ,QAAQ,GAAG,IAAI,CAAC,CAAC;AAC1E;AACA,OAAO,SAASc,OAAO,CAACC,OAAO,EAAEC,QAAQ,EAAE;EACzC,IAAI,CAAClB,gBAAgB,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